package cn.funnyxb.powerremember.beans;

import android.content.Context;
import android.content.res.Resources;
import android.database.Cursor;
import java.io.Serializable;
import java.util.ArrayList;

public class AlarmInfo
  implements Serializable
{
  public static final int ALARMTYPE_BOTH = 2;
  public static final int ALARMTYPE_SHAKE = 0;
  public static final int ALARMTYPE_VOICE = 1;
  private static final long serialVersionUID = 1L;
  private int _id;
  private int alarmType = 2;
  private boolean isEnabled;
  private boolean isWorkOnlyWhenDelay;
  private String memo = "";
  private int repeatValue = 127;
  private int taskId;
  private int time = 730;

  public static AlarmInfo getExample_morning()
  {
    AlarmInfo localAlarmInfo = new AlarmInfo();
    localAlarmInfo.isEnabled = true;
    localAlarmInfo.isWorkOnlyWhenDelay = false;
    localAlarmInfo.time = 730;
    localAlarmInfo.repeatValue = 127;
    return localAlarmInfo;
  }

  public static AlarmInfo getExample_night()
  {
    AlarmInfo localAlarmInfo = new AlarmInfo();
    localAlarmInfo.isEnabled = true;
    localAlarmInfo.isWorkOnlyWhenDelay = false;
    localAlarmInfo.time = 2030;
    localAlarmInfo.repeatValue = 127;
    return localAlarmInfo;
  }

  public static AlarmInfo getExample_noon()
  {
    AlarmInfo localAlarmInfo = new AlarmInfo();
    localAlarmInfo.isEnabled = true;
    localAlarmInfo.isWorkOnlyWhenDelay = false;
    localAlarmInfo.time = 1420;
    localAlarmInfo.repeatValue = 127;
    return localAlarmInfo;
  }

  public static AlarmInfo parseFromCursor(Cursor paramCursor)
  {
    Object localObject;
    if ((paramCursor == null) || (paramCursor.getCount() <= 0))
      localObject = null;
    while (true)
    {
      label15: return localObject;
      AlarmInfo localAlarmInfo = new AlarmInfo();
      try
      {
        localAlarmInfo._id = paramCursor.getInt(paramCursor.getColumnIndex("_id"));
        if (paramCursor.getInt(paramCursor.getColumnIndex("isenable")) > 0);
        for (int i = 1; ; i = 0)
        {
          localAlarmInfo.isEnabled = i;
          localAlarmInfo.taskId = paramCursor.getInt(paramCursor.getColumnIndex("taskid"));
          if (paramCursor.getInt(paramCursor.getColumnIndex("isworkonlywhendelay")) <= 0)
            break;
          j = 1;
          localAlarmInfo.isWorkOnlyWhenDelay = j;
          localAlarmInfo.time = paramCursor.getInt(paramCursor.getColumnIndex("time"));
          localAlarmInfo.repeatValue = paramCursor.getInt(paramCursor.getColumnIndex("repeat"));
          localAlarmInfo.memo = paramCursor.getString(paramCursor.getColumnIndex("memo"));
          localAlarmInfo.alarmType = paramCursor.getInt(paramCursor.getColumnIndex("type"));
          localObject = localAlarmInfo;
          break label15:
        }
        int j = 0;
      }
      catch (Exception localException)
      {
        localObject = null;
        break label15:
      }
    }
  }

  public int getAlarmType()
  {
    return this.alarmType;
  }

  public String getAlarmTypeText(Context paramContext)
  {
    String[] arrayOfString = paramContext.getResources().getStringArray(2130968577);
    if (this.alarmType == 1);
    for (String str = arrayOfString[0]; ; str = "unknown")
      while (true)
      {
        return str;
        if (this.alarmType == 0)
          str = arrayOfString[1];
        if (this.alarmType != 2)
          break;
        str = arrayOfString[2];
      }
  }

  public String getMemo()
  {
    return this.memo;
  }

  public String getRepeatText(Context paramContext)
  {
    ArrayList localArrayList = new ArrayList();
    boolean[] arrayOfBoolean = getRepeatValueInBoolean();
    String[] arrayOfString = paramContext.getResources().getStringArray(2130968576);
    int i = 0;
    int j = 0;
    if (j > 6)
      label30: if (i != 7)
        break label80;
    for (String str = arrayOfString[7]; ; str = localArrayList.toString())
    {
      return str;
      if (arrayOfBoolean[j] != 0)
      {
        ++i;
        localArrayList.add(arrayOfString[j]);
      }
      ++j;
      label80: break label30:
    }
  }

  public int getRepeatValue()
  {
    return this.repeatValue;
  }

  public boolean[] getRepeatValueInBoolean()
  {
    int i = this.repeatValue;
    if (i < 0)
      i = 0;
    boolean[] arrayOfBoolean = new boolean[7];
    int j = 0;
    if (j > 6)
      label18: return arrayOfBoolean;
    if (i % 2 == 1);
    for (int k = 1; ; k = 0)
    {
      arrayOfBoolean[j] = k;
      i /= 2;
      ++j;
      break label18:
    }
  }

  public int getTaskId()
  {
    return this.taskId;
  }

  public int getTime()
  {
    return this.time;
  }

  public int getTime_hh()
  {
    return (this.time / 100);
  }

  public int getTime_mm()
  {
    return (this.time % 100);
  }

  public int get_id()
  {
    return this._id;
  }

  public boolean isEnabled()
  {
    return this.isEnabled;
  }

  public boolean isRandomOil()
  {
    if ((this.memo != null) && (this.memo.trim().length() != 0));
    for (int i = 0; ; i = 1)
      return i;
  }

  public boolean isRing()
  {
    if ((this.alarmType != 1) && (this.alarmType != 2));
    for (int i = 0; ; i = 1)
      return i;
  }

  public boolean isShake()
  {
    if ((this.alarmType != 0) && (this.alarmType != 2));
    for (int i = 0; ; i = 1)
      return i;
  }

  public boolean isWorkOnlyWhenDelay()
  {
    return this.isWorkOnlyWhenDelay;
  }

  public String phraseTime2Str()
  {
    String str2;
    if (this.time < 0)
    {
      str2 = "";
      label10: return str2;
    }
    StringBuilder localStringBuilder = new StringBuilder().append(this.time / 100).append(":");
    if (this.time % 100 < 10);
    for (String str1 = "0"; ; str1 = "")
    {
      str2 = str1 + (this.time % 100);
      break label10:
    }
  }

  public void setAlarmType(int paramInt)
  {
    this.alarmType = paramInt;
  }

  public void setEnabled(boolean paramBoolean)
  {
    this.isEnabled = paramBoolean;
  }

  public void setMemo(String paramString)
  {
    this.memo = paramString;
  }

  public void setRepeatValue(int paramInt)
  {
    this.repeatValue = paramInt;
  }

  public void setRepeatValue(boolean[] paramArrayOfBoolean)
  {
    if (paramArrayOfBoolean.length != 7)
    {
      this.repeatValue = 0;
      return;
    }
    this.repeatValue = 0;
    int i = 1;
    for (int j = 0; ; ++j)
    {
      if (j <= 6);
      if (paramArrayOfBoolean[j] != 0)
        this.repeatValue = (i + this.repeatValue);
      i *= 2;
    }
  }

  public void setTaskId(int paramInt)
  {
    this.taskId = paramInt;
  }

  public void setTime(int paramInt)
  {
    this.time = paramInt;
  }

  public void setTime(int paramInt1, int paramInt2)
  {
    this.time = (paramInt2 + paramInt1 * 100);
  }

  public void setValue(AlarmInfo paramAlarmInfo)
  {
    this.isEnabled = paramAlarmInfo.isEnabled;
    this.isWorkOnlyWhenDelay = paramAlarmInfo.isWorkOnlyWhenDelay;
    this.memo = paramAlarmInfo.memo;
    this.repeatValue = paramAlarmInfo.repeatValue;
    this.taskId = paramAlarmInfo.taskId;
    this.time = paramAlarmInfo.time;
    this.alarmType = paramAlarmInfo.alarmType;
  }

  public void setWorkOnlyWhenDelay(boolean paramBoolean)
  {
    this.isWorkOnlyWhenDelay = paramBoolean;
  }

  public static class RepeatInfo
  {
    public int computeRepeatValue(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4, boolean paramBoolean5, boolean paramBoolean6, boolean paramBoolean7)
    {
      int i;
      label7: int j;
      label14: int l;
      label28: int i2;
      label44: int i4;
      label60: int i6;
      label76: int i7;
      if (paramBoolean1)
      {
        i = 1;
        if (!(paramBoolean2))
          break label104;
        j = 2;
        int k = i + j;
        if (!(paramBoolean3))
          break label110;
        l = 4;
        int i1 = k + l;
        if (!(paramBoolean4))
          break label116;
        i2 = 8;
        int i3 = i1 + i2;
        if (!(paramBoolean5))
          break label122;
        i4 = 16;
        int i5 = i3 + i4;
        if (!(paramBoolean6))
          break label128;
        i6 = 32;
        i7 = i5 + i6;
        if (!(paramBoolean7))
          break label134;
      }
      for (int i8 = 64; ; i8 = 0)
      {
        return (i7 + i8);
        i = 0;
        break label7:
        label104: j = 0;
        break label14:
        label110: l = 0;
        break label28:
        label116: i2 = 0;
        break label44:
        label122: i4 = 0;
        break label60:
        label128: i6 = 0;
        label134: break label76:
      }
    }

    public boolean isWorkOfWeekX(int paramInt1, int paramInt2)
    {
      if ((paramInt1 / 2 ^ paramInt2 - 1) % 2 == 1);
      for (int i = 1; ; i = 0)
        return i;
    }
  }
}

/* Location:           E:\Desktop\复件 classes_dex2jar.jar
 * Qualified Name:     cn.funnyxb.powerremember.beans.AlarmInfo
 * JD-Core Version:    0.5.3
 */